<template>
  <div>
    <Child :msg="str" @sendToFather="getData"></Child>
    <Sister></Sister>
    <Brother></Brother>
  </div>
</template>

<script>
import Child from '@/components/Child.vue'
import Sister from '@/components/Sister.vue'
import Brother from '@/components/Brother.vue'

export default {
  data(){
    return{
      str:"我是父组件的值，我要传到子组件"
    }
  },
  components: {
    Child,
    Sister,
    Brother
  },
  methods:{
    getData(data){
      console.log(data);
    }
  }
}
</script>

<style>
</style>
